<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>1</title>
    <script src="https://unpkg.com/vue@next"></script>
</head>

<body>
    <div id='root'>
       <button @click='handleButton'>button</button>
       <hr>
       简单表达式：{{count}}
        <button @click="count++">count++</button>
        <hr>
        事件对象：event
        <button @click="hadlevent">event1</button>
        <br>
        <button @click="hadlevent2(1,$event)">event2传参</button>
        <hr>
        <button @click="hand1(), hand2()">触发多个事件</button>
    </div>
    <script>
        let app = Vue.createApp({
            data() {
                return {
                    count:0
                }
            },
            methods:{
                handleButton(){
                   alert(1)
                },
                hadlevent(event){
                    console.log(event.target)
                },
                hadlevent2(argm1,event){
                    console.log('argm1',argm1);
                    console.log(event.target);
                },
                hand1(){
                    alert('hand1')
                },
                hand2(){
                    alert('hand2')
                }
            }
        })

        let vm = app.mount('#root')
    </script>
</body>
</html>